{# needed becaues vue/compat removes them from $attrs #}
{# New mt-tabs component #}
{% block sw_tabs %}
<template v-if="useMeteorComponent">
    <mt-tabs
        v-bind="$attrs"
        ref="tabComponent"
        :items="itemsBackwardCompatible"
        @new-item-active="onNewItemActive"
    />

    {# Render content slot as fallback #}
    <slot
        name="content"
        v-bind="{ active: activeItem }"
    >
    </slot>
</template>
{% endblock %}

{# v-on="$listeners" needed becaues vue/compat removes them from $attrs #}
{# Deprecated component #}
{% block sw_tabs_deprecated %}
<sw-tabs-deprecated
    v-else
    v-bind="$attrs"
    ref="tabComponent"
>
    <template
        v-for="(index, name) in getSlots()"
        #[name]="data"
    >
        <slot
            :name="name"
            v-bind="data || {}"
        >
        </slot>
    </template>
</sw-tabs-deprecated>
{% endblock %}
